<template>
  <div>
    <div v-for="(item, index) in list" :key="index">
      <arr1 :item="item"></arr1>
    </div>
    <button @click="del">删除</button>
  </div>
</template>
<script>
import arr1 from "./arr1.vue";
export default {
  components: {
    arr1,
  },
  data() {
    return {
      list: [
        { id: 1, name: "张三" },
        { id: 2, name: "李四" },
        { id: 3, name: "王五" },
        { id: 4, name: "账务" },
      ],
    };
  },
  methods:{
      del(){
          this.list.splice(1,1)
      }
  }
};
</script>